const express=require("express");
const router=express.Router();

//封装测试api
const ctr=require("./controller.js");
router.get("/",ctr.testAPI);
// 获取所有英雄
router.get("/getallhero",ctr.getallhero)
//添加英雄
router.post("/addhero",ctr.addhero)
//根据id查询英雄
router.get("/gethero/:id",ctr.gethero)
// 更新英雄
router.post("/updatehero/:id",ctr.updatehero)
// 软删除英雄
router.get("/deletehero/:isdel/:id",ctr.deletehero)
// 硬删除
router.get("/deleteyx/:id",ctr.deleteyx)
module.exports=router;